﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.ApproveWorkflow.Models;
using AutoMapper;
using Microhard.Core.DBUtility;
using Microhard.ApproveWorkflow.DataAccess;

namespace Microhard.ApproveWorkflow.DTO
{
    public static class WorkflowMapExtension
    {
        #region WorkflowType
        public static ApproveFlowTypeModel ToModel(this t_WorkFlowType entity)
        {
            return Mapper.Map<ApproveFlowTypeModel>(entity);
        }

        public static t_WorkFlowType ToEntity(this ApproveFlowTypeModel model)
        {
            return Mapper.Map<t_WorkFlowType>(model);
        }
        #endregion

        #region FlowChart
        public static ApproveFlowChat ToModel(this t_FlowChart entity)
        {
            return Mapper.Map<ApproveFlowChat>(entity);
        }

        public static t_FlowChart ToEntity(this ApproveFlowChat model)
        {
            return Mapper.Map<t_FlowChart>(model);
        }
        #endregion

        #region Workflow Activity
        public static ActivityModel ToModel(this t_ActivityInWorkFlow entity)
        {
            return Mapper.Map<ActivityModel>(entity);
        }

        public static t_ActivityInWorkFlow ToEntity(this ActivityModel model)
        {
            return Mapper.Map<t_ActivityInWorkFlow>(model);
        }
        #endregion

    }
}
